<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');

$config = array(
		'category/change_priority' => array(
				array(
						'field' => 'category_code[]',
						'label' => 'lang:category_code',
						'rules' => 'trim|required|alpha_numeric|max_length[16]|xxs_clean'
				),
				array(
						'field' => 'display_order[]',
						'label' => 'lang:display_order',
						'rules' => 'trim|required|numeric|is_natural_no_zero|max_length[4]|xxs_clean'
				),
				array(
						'field' => 'display_order',
						'label' => 'lang:display_order',
						'rules' => 'callback__is_priority'
				)
		),
		'category/add_category' => array(
				array(
						'field' => 'before_parent_category_code',
						'label' => 'lang:parent_category_code',
						'rules' => 'trim|required|alpha_numeric|max_length[16]|xxs_clean'
				),
				array(
						'field' => 'category_code',
						'label' => 'lang:category_code',
						'rules' => 'trim|required|alpha_numeric|max_length[16]|is_unique[category.category_code]|xxs_clean'
				),
				array(
						'field' => 'category_name_pc',
						'label' => 'lang:category_name_pc',
						'rules' => 'trim|required|max_length[20]|xxs_clean'
				)
		),
		'category/upd_category' => array(
				array(
						'field' => 'before_parent_category_code',
						'label' => 'lang:parent_category_code',
						'rules' => 'trim|required|alpha_numeric|max_length[16]|xxs_clean'
				),
				array(
						'field' => 'parent_category_code',
						'label' => 'lang:parent_category_code',
						'rules' => 'trim|required|alpha_numeric|max_length[16]|xxs_clean'
				),
				array(
						'field' => 'category_code',
						'label' => 'lang:category_code',
						'rules' => 'trim|required|alpha_numeric|max_length[16]|xxs_clean'
				),
				array(
						'field' => 'category_name_pc',
						'label' => 'lang:category_name_pc',
						'rules' => 'trim|required|max_length[20]|xxs_clean'
				)
		),
		'category/del_category' => array(
				array(
						'field' => 'category_code',
						'label' => 'lang:category_code',
						'rules' => 'trim|required|alpha_numeric|max_length[16]|xxs_clean'
				)
		)

);